package com.cn.jinl.dao;

import com.cn.jinl.domain.ProductStorageRelate;
import com.cn.jinl.domain.ProductStorageRelateExample;
import java.util.List;
import java.util.Map;

import com.cn.jinl.domain.ProductStorageVo;
import com.cn.jinl.utils.QueryForm;
import org.apache.ibatis.annotations.Param;

public interface ProductStorageRelateMapper {
    int countByExample(ProductStorageRelateExample example);

    int deleteByExample(ProductStorageRelateExample example);

    int insert(ProductStorageRelate record);

    int insertSelective(ProductStorageRelate record);

    int batchInsertProdStorageRelate(@Param("itemList") List<ProductStorageRelate> records);

    List<ProductStorageRelate> selectByExample(ProductStorageRelateExample example);
    List<ProductStorageVo> selectProductStorageRelateById(String id);

    List<ProductStorageRelate> selectStorageByPlanIdOrOrderId(QueryForm queryForm);
    List<ProductStorageRelate> selectOnDutyStorageHisByPlanId(String planId);
    List<ProductStorageRelate> selectNotInStorageProduct();

    List<ProductStorageRelate> selectLeftProductStorages();

    String selectStorageIdByWhiteDay(QueryForm queryForm);

    int updateByExampleSelective(@Param("record") ProductStorageRelate record, @Param("example") ProductStorageRelateExample example);

    int updateByExample(@Param("record") ProductStorageRelate record, @Param("example") ProductStorageRelateExample example);

    Integer getCount(ProductStorageRelateExample example);

    ProductStorageRelate selectByCode(String boxCode);

    int getCountByReporting(QueryForm queryForm);

    List<ProductStorageRelate>selectProductStorageRelateGroupByCode();

    List<ProductStorageRelate> selectReportingCountBatch(@Param("itemId") String itemId, @Param("gradeValues") List<String> gradeValues);

    List<Map<String, Object>> selectReportingCountByBoxCodesWithCondition(@Param("itemId") String itemId, @Param("gradeValues") List<String> gradeValues, @Param("boxCodes") List<String> boxCodes);

    List<ProductStorageRelate> selectInDataWithBoxCodes(QueryForm queryForm);

    List<Map<String, Object>> selectAllItemGradeCombinations();

    List<String> selectBoxCodesByItemAndGrade(@Param("itemTypeId")String itemTypeId, @Param("gradeValue")String gradeValue);

    List<Map<String, Object>> selectByBoxCodesAndItemGrade(@Param("boxCodes") List<String> boxCodes,@Param("itemTypeId") String itemTypeId, @Param("gradeValue")String gradeValue);

    int batchInsertProdStorageRelate1(@Param("itemList") List<ProductStorageRelate> records);

    List<ProductStorageRelate> getOrderGradesByAppMh(QueryForm queryForm);
}